package com.logisticeservice.controller;

import com.example.orderservice.model.OrderInfo;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@RabbitListener(queues = "order.queue")
@Component
public class ListenerController {
    @RabbitHandler
    public void handMessage(String orderInfo) {
        System.out.println("接收message: " + orderInfo);
    }
    @RabbitHandler
    public void handMessage(OrderInfo orderInfo) {
        System.out.println("接收到消息orderInfo: " + orderInfo);
    }
}
